home *** CD-ROM | disk | FTP | other *** search
- Path: news.pi.net!news
- From: cat.tech@pi.net (Remy Cool)
- Newsgroups: comp.lang.c++
- Subject: Problem: ERROR: Cannot convert 'const void * ' to ' const HBITMAP_* '
- Date: Sat, 02 Mar 1996 11:07:41 GMT
- Organization: Cool Applied Technology
- Message-ID: <4h9a8h$89i@neptunus.pi.net>
- Reply-To: cool@pi.net
- NNTP-Posting-Host: hen19.pi.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- I have the folowing problem :
-
- In the online help from BTC++ > BitBlt function, is an example on how to show Bitmaps from the
- Resource on the screen.
-
-
- /* code as described in online help BitBlt function */
-
- Void TMyWindow:: ........
- {
- HDC hdc, hdcMemory;
- HBITMAP hbmpGraphic, hbmpOld;
- BITMAP bm;
-
- hbmpGraphic = LoadBitmap(GetApplication()->hInstance, "MyBitmap");
- GetObject(hbmpGraphic, sizeof(BITMAP), &bm);
-
- hdc = GetDC(HWindow);
- hdcMemory = CreateCompatibleDC(hdc);
- hbmpOld = SelectObject(hdcMemory, hbmpGraphic); // >>> Line 98
-
- BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMemory, 0, 0, SRCCOPY);
- SelectObject(hdcMemory, hbmpOld);
-
- DeleteDC(hdcMemory);
- ReleaseDC(HWindow, hdc);
- }
-
- When I use this code in my program, I get the following Compiler Error.
-
- Compiling MyApp.CPP:
- Error MyApp.CPP 98: Cannot convert 'const void *' to 'const HBITMAP__ *'
-
- What is wrong with it and what's the solution ?
-
- Regards,
-
- Remy
-
-
-
-
-
-